<%@page pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        车位使用添加
    </title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" media="all">
    <style>
        .imgs{display: none;}
    </style>

</head>
<body>

<div class="x-body">
    <form class="layui-form layui-form-pane" action="${pageContext.request.contextPath}/asset/edit" id="edit" method="post" enctype="multipart/form-data">
        <input type="text" name="id" value="${asset.id}" hidden>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>所属小区
            </label>
            <div class="layui-input-block">
                <select name="vname" id="community_id">
                    <option>请选择小区</option>
                    <c:forEach items="${villages}" var="village">
                        <option value="${village.id}"> ${village.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>设备编号
            </label>
            <div class="layui-input-block">
                <input type="text" name="equipId" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.equipId}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>设备名称
            </label>
            <div class="layui-input-block">
                <input type="text" name="name" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>品牌
            </label>
            <div class="layui-input-block">
                <input type="text" name="brand" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.brand}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>购买单价(￥)
            </label>
            <div class="layui-input-block">
                <input type="text" name="price" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.price}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>购买数量
            </label>
            <div class="layui-input-block">
                <input type="text" name="num" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.num}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>预计使用年限(年)
            </label>
            <div class="layui-input-block">
                <input type="text" name="serviceLife" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${asset.serviceLife}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='fa fa-calendar'>*</span>购买日期
            </label>

            <div class="layui-input-inline">
                <input type="datetime-local" class="layui-input" name="bdate" placeholder="出生日期" id="LAY_demorange_s" value="" >
            </div>

        </div>
        <div class="layui-form-item">
            <button class="layui-btn" type="submit" lay-filter="add" lay-submit="">
                保存
            </button>
        </div>

        <div style="height:100px;"></div>
    </form>
</div>
<script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>

<script>
    layui.use(['laydate','element','layer','form'], function(){
        $ = layui.jquery;//jquery
        lement = layui.element();//面包导航
        layer = layui.layer;//弹出层
        form = layui.form();
        laydate = layui.laydate;//日期插件
        form.render();

    })
</script>
</body>
</html>